Skip to content

fix(rehearsal): configurable grant lifetimes; document caching and custom-domain rationale - #9

Merged
mellowcroc merged 1 commit into
mainfrom
fix/grant-ttl-and-storage-docs
Aug 20, 2026
Merged

fix(rehearsal): configurable grant lifetimes; document caching and custom-domain rationale#9
mellowcroc merged 1 commit into
mainfrom
fix/grant-ttl-and-storage-docs

Conversation

@mellowcroc

Copy link
Copy Markdown
Collaborator

Two follow-ups from running the flow at production size (2026-08-20 Relay-driven K=21 first-head test):

1. Grant lifetimes are env-configurable. The grant scripts hardcoded --credential-ttl 1h --minimum-upload-window 15m — fine for the tiny circuit, but a K=21 contribution can spend most of an hour computing before its upload begins, so the grant expired mid-turn and the scripts had to be bypassed with a direct relay coordinator grant. Both values are now env-configurable (PARTICIPANT_GRANT_TTL, PARTICIPANT_GRANT_MIN_UPLOAD_WINDOW, EVIDENCE_GRANT_TTL, EVIDENCE_GRANT_MIN_UPLOAD_WINDOW) with the previous values as defaults, documented in the machine-1 .env example.

2. STORAGE.md: measured caching facts + custom-domain rationale.

  • Spells out the stale-pointer failure mode behind the state/* no-cache rule (participants stuck on "not your turn", witnesses missing the closure window, no error anywhere) and gives the 5-minute write→read→overwrite→read probe to verify freshness per origin.
  • Records the measurement: both guided setups are uncached by construction (CloudFront provisioned with CachingDisabled; r2.dev does not cache at all) — so blob/* caching is a pure optimization that requires re-running the probe.
  • Clarifies the production custom domain is an availability/longevity requirement (r2.dev rate limits during timed windows; a stable long-lived transcript URL), not an integrity one — artifacts are content-addressed and signature-verified, so a URL can only fail to serve, never forge. Also notes the custom domain changes the caching surface.

…stom-domain rationale

The grant scripts hardcoded --credential-ttl 1h --minimum-upload-window 15m,
which fits the tiny circuit but not a production-sized turn: a K=21
contribution can spend the better part of an hour computing before its
upload begins, so the grant expires mid-turn and the scripts have to be
bypassed. Make both values env-configurable (PARTICIPANT_GRANT_TTL,
PARTICIPANT_GRANT_MIN_UPLOAD_WINDOW, EVIDENCE_GRANT_TTL,
EVIDENCE_GRANT_MIN_UPLOAD_WINDOW) with the previous values as defaults, and
document them in the machine-1 env example.

STORAGE.md additions from the 2026-08-20 measurements:
- spell out the stale-pointer failure mode behind the state/* no-cache rule,
  give the write-read-overwrite-read probe procedure, and record that both
  guided setups are uncached by construction (CloudFront CachingDisabled;
  r2.dev does not cache) so blob/* caching is a pure optimization that
  requires re-running the probe;
- clarify that the production custom domain is an availability and longevity
  requirement, not an integrity one, and that switching to it changes the
  caching surface.
@mellowcroc
mellowcroc force-pushed the fix/grant-ttl-and-storage-docs branch from 536525d to 1daf628 Compare August 20, 2026 17:15
@mellowcroc
mellowcroc merged commit da1c71e into main Aug 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant